var api = require('../../utils/api.js');
var app = getApp();
var WxParse = require('../../wxParse/wxParse.js');

Page({

    /**
     * 页面的初始数据
     */
    data: {
        id:''
    },

    /**
     * 生命周期函数--监听页面加载
     */
    onLoad(options) {
        this.setData({
            id:options.id
        })
        this.getallyunyin();
    },
    getallyunyin() {
        var that=this;
        var id=this.data.id;
        api.post({
            url: 'huodong/getinfobyid',
            data: {id:id},
            success: data => {
                console.log(data);
                console.log(data);
        
                WxParse.wxParse('articleContent', 'html', data.data.content, this, 30);
                that.setData({
                    vlink:data.data.v_link,
                    contents:data.data.content
                })
                
            }
        });
    },
})